/*
 * @Description: 
 * @version: 
 * @Author: cy
 * @Date: 2021-07-19 09:46:26
 * @LastEditors: cy
 * @LastEditTime: 2021-07-19 10:52:51
 */
const { Stack } = PacktDataStructuresAlgorithms;
console.log('hello1-------->', Stack)
const stack = new Stack();
console.log(stack.isEmpty())
// 向栈内添加元素
stack.push(5)
stack.push(8);
console.log('查看栈顶元素:', stack.peek())

stack.push(11);
console.log('数组长度：', stack.size());
stack.push(15);
stack.pop();
stack.pop();
console.log('数组长度：', stack.size());